home *** CD-ROM | disk | FTP | other *** search
Text File | 1998-03-19 | 3.5 KB | 97 lines | [TEXT/MPS ] |
- #
- # ****************************************************************************
- #
- # File Name: OutPut.Lib
- #
- # Contains: Tasks used for output
- #
- # Written by: KTA, KL, ML, GS et al
- #
- # Copyright: © 1993-1995 by Apple Computer, Inc., all rights reserved.
- #
- # ****************************************************************************
- # C h a n g e H i s t o r y (most recent first):
- # ****************************************************************************
- #
- # Vers Date Author Description
- # ---- -------- ------ ---------------------------------------------
- # <1.0.14> 5/8/95 ML define global gLogStrCount if undefined
- # <1.0.13> 4/14/95 KTA LogStr() - Added support for AIQ reporting.
- # <1.0.12> 4/5/95 ML Removed LogPriority parameter
- # <1.0.11> 4/5/95 ML Remove libraries declaration
- # <1.0.10> 2/28/95 ML marked
- # <1.0.9> 12/13/94 KTA Removed TargetCheck()
- # <1.0.8> 12/13/94 ML Removed gloglevel
- # <1.0.7> 11/29/94 ML Added exception handling support
- # <1.0.6> 4/20/94 ML Marked.
- # <1.0.5> 12/2/93 KTA LogStr()- added gLogStrHook to do anything custom after logging.
- # <1.0.3> 6/8/93 NAGA unmark tasks that are not published
- # <1.0.2> 5/21/93 NAGA Adding header and porting old files to follow new standards
- #
- # ****************************************************************************
-
- ########################################################################
- # External libraries
- #=======================================================================
- #########################################################################
- # LogStr(pTheString, pLogPriority,pReportLibTask)
- #========================================================================
- # Author: KTA
- # Description: Match the target and print it with whatever is passed
- # to it in the 'str' parameter. Set the appropriate
- # LogPriority based on the context of the string.
- # Parameters: pTheString - string to be printed
- # LogPriority - The priority of the string to be printed
- # 0 - No logging
- # 1 - Errors
- # 2 - Comments and Notes
- # 3 - Summary information
- # 4 - More detailed
- # 5 - Detailed description
- # Returns: Nothing
- # Examples: LogStr("It worked");
- # LogStr("It worked",3);
- # Assumptions: None
- #========================================================================
- # History:
- # KTA 12/01/93 Added gLogStrHook
- # ML 12/12/94 Removed gloglevel, don't use LogPriority
- # removed gTargetCheck, just output gApptitle if defined
- # Added another hook for app verification
- # ML 4/5/95 Removed LogPriority parameter
- # KTA 4/11/95 Added support for AIQ reporting.
- # ML 5/8/95 define global gLogStrCount if undefined
- #########################################################################
- TASK LogStr(pTheString, pLogPriority := 5,pReportLibTask := 'RStatus')
- begin
- if(global gUseReportLibHooks) AND not(isUndefined(global gReportLibHooks))
- begin
- returnVal := call(assoc(pReportLibTask, gReportLibHooks),pTheString,pLogPriority);
-
- if(global gLogStrHook2)
- Call(gLogStrHook2);
-
- return returnVal;
- end;
- else
- begin
- theStr := '';
-
- if(global gLogStrHook1)
- Call(gLogStrHook1);
-
- if (global gAppVerify) and (global gAppTitle)
- theStr := "(Target - Application:∂'{global gAppTitle}∂')";
-
- if not (global gDisableAllLogging)
- begin
- if isundefined(global gLogStrCount)
- gLogStrCount := 0;
- global gLogStrCount := gLogStrCount + 1;
- println gLogStrCount," - ",pTheString," {theStr} ";
- end;
-
- if(global gLogStrHook2)
- Call(gLogStrHook2);
- end;
- end; # LogStr()